package com.zjhd.sealcutting.service;

import com.zjhd.sealcutting.utils.response.ResponseResult;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;

/**
 * TODO  文件上传
 *
 * @author wangchao
 * @version 1.0
 * @date 2020/11/24 17:44
 */
public interface FileUploadService {

    /**
     * TODO  文件上传
     * @author wangchao
     * @date 2020/11/24 18:05
     * @param
     * @return
     */
    ResponseResult uploadFile(HttpServletRequest request);

    /**
     * TODO  文件下载
     * @author wangchao
     * @date 2020/11/24 18:05
     * @param
     * @return
     */
    void download(String id, HttpServletRequest request, HttpServletResponse response);

    /**
     * TODO 根据ID查询文件信息
     * @author wangchao
     * @date 2020/11/27 10:00
     * @param
     * @return
     */
    ResponseResult queryByIdFile(String id)throws Exception;

    /**
     * TODO  根据作品ID下载作品图片文件
     * @author wangchao
     * @date 2020/12/8 17:47
     * @param
     * @return
     */
    void downloadWorksFile(String workId, HttpServletRequest request, HttpServletResponse response) throws Exception;
}
